﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;

namespace GestionSaludOcupacional.Portal.App_Start
{
    public static class FHelper
    {
        public static string GetErrors(this ModelStateDictionary model)
        {
            var errors = (from item in model.Values where item.Errors.Any() select item.Errors.First().ErrorMessage).ToList();
            return string.Join("<br/>", errors);
        }
    }
}